data {
  int<lower=0> N;
  int<lower=0,upper=1> majclash[N];
  vector[N] igo_allothers;
  vector[N] highgrav;
  vector[N] territory;
  vector[N] jointpol7;
  vector[N] rivalry_th;
  vector[N] absidealdiff;
  vector[N] atopally;
}
parameters {
  vector[8] beta;
}
model {

  for (k in 1:8)
        beta[k] ~ normal(0, 10);

  majclash ~ bernoulli_logit(beta[1] + beta[2] * igo_allothers 
                             + beta[3] * highgrav
                             + beta[4] * territory
                             + beta[5] * jointpol7
                             + beta[6] * rivalry_th
                             + beta[7] * absidealdiff
                             + beta[8] * atopally);
}
generated quantities {
  vector[N] pred;
  for (i in 1:N)
    pred[i] = inv_logit(beta[1] + beta[2] * igo_allothers[i] 
                             + beta[3] * highgrav[i]
                             + beta[4] * territory[i]
                             + beta[5] * jointpol7[i]
                             + beta[6] * rivalry_th[i]
                             + beta[7] * absidealdiff[i]
                             + beta[8] * atopally[i]);
}